{% extends "base.html" %}

{% block bodycontent %}

    <!--header end-->
    <div id="mainbody">
        <div class="blogs">
            <div id="index_view">
                <h2 class="t_nav"><a href="/">网站首页</a><a>一次尝试</a></h2>
                <h1 class="c_titile">{{ blog_content.blog_title }}</h1>
                <p class="box">
                    发布时间：{{ blog_content.blog_timestamp }}<span>作者：{{ blog_content.blog_author }}</span><span>阅读:{{ blog_content.blog_clicknum }}
                <p>
                    {% if blog_content.blog_imgurl %}
                        <img src="{{ blog_content.blog_imgurl }}"><br>
                    {% endif %}
                    {{ blog_content.blog_body |safe }}
                </p>
                </ul>
            </div>
            <aside>
                <div class="tuijian">
                    <h2>推荐文章</h2>
                    <ol>
                        {% for title in like_rank %}
                            <li><span><strong>{{ forloop.counter }}</strong></span><a
                                    href="{% url 'article' title.id %}">{{ title.blog_title }}</a></li>
                        {% endfor %}

                    </ol>
                </div>

                <div class="clicks">
                    <h2>热门点击</h2>
                    <ol>

                        {% for foo in hot_rank %}
                            <li><span><a href="{% url 'article' foo.id %}">{{ foo.blog_type }}</a></span><a
                                    href="{% url 'article' foo.id %}">{{ foo.blog_title }}</a></li>
                        {% endfor %}

                    </ol>
                </div>

                <div class="search">
                    <form class="searchform" method="post" action="/search">
                        {% csrf_token %}
                        <input type="text" name="keywords" value="输入文章标题搜索" onfocus="this.value=''"
                               onblur="this.value='输入文章标题搜索'">
                    </form>
                </div>

            </aside>
        </div>
        <!--blogs end-->
    </div>
    <!--mainbody end-->
{% endblock bodycontent %}